package miiteen.demo.web.dao;

import miiteen.data.dao.impl.BaseDaoImpl;
import miiteen.demo.web.beans.WebInfo;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Repository("webInfoDao")
public class WebInfoDao extends BaseDaoImpl<WebInfo> {
    @Override
    protected String getMapper(){
        return "miiteen.demo.web.beans.WebInfo";
    }

    @Resource(name = "sqlSessionFactory2")
    public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory){
        super.setSqlSessionFactory(sqlSessionFactory);
    }

    public List<WebInfo> findBySNCode(Map<String,Object> map){
        return getSqlSession().selectList(getMapper()+".findBySNCode",map);
    }

}
